/* 
 * File:   Question.h
 * Author: mvdr
 *
 * Created on March 19, 2013, 3:02 PM
 */

#ifndef QUESTION_H
#define	QUESTION_H

#include "State.h"
#include <vector>
#include <stdlib.h>

class Questions {
    
    size_t d_size;
    
public:
    Questions();    
    Questions(Questions const &);
    
    bool answer(int player, int question, State const &state);
    size_t size() const;
    
private:    
    
    bool areThereConsecutive(std::vector<char> const &p1, std::vector<char> const &p2); //0
    bool sumLessThan16(std::vector<char> const &p1, std::vector<char> const &p2); //1
    bool sumMoreThan20(std::vector<char> const &p1, std::vector<char> const &p2); //2
    bool atLeastOneBoardOnlyEven(std::vector<char> const &p1, std::vector<char> const &p2); //3
    bool atLeastOneBoardOnlyOdd(std::vector<char> const &p1, std::vector<char> const &p2); //4
    bool onlyEven(std::vector<char> const &p1, std::vector<char> const &p2); //5
    bool onlyOdd(std::vector<char> const &p1, std::vector<char> const &p2); //6
    bool moreEvenThanOdd(std::vector<char> const &p1, std::vector<char> const &p2); //7
    bool moreOddThanEven(std::vector<char> const &p1, std::vector<char> const &p2); //8
    bool oddAndEvenEqual(std::vector<char> const &p1, std::vector<char> const &p2); //9
    
    bool atLeast1Modulo3(std::vector<char> const &p1, std::vector<char> const &p2); //10
    bool atLeast2Modulo3(std::vector<char> const &p1, std::vector<char> const &p2); //11
    bool oneNumberDivisableByAnother(std::vector<char> const &p1, std::vector<char> const &p2); //12
    bool eachBoardSameSum(std::vector<char> const &p1, std::vector<char> const &p2); //13
    bool eachBoardSameDiff(std::vector<char> const &p1, std::vector<char> const &p2); //14
    bool fourInARow(std::vector<char> const &p1, std::vector<char> const &p2); //15
    bool threeInARow(std::vector<char> const &p1, std::vector<char> const &p2); //16
    bool twoInARow(std::vector<char> const &p1, std::vector<char> const &p2); //17
    bool atLeast2inARow(std::vector<char> const &p1, std::vector<char> const &p2); //18
    bool atLeast3inARow(std::vector<char> const &p1, std::vector<char> const &p2); //19
    
};

inline size_t Questions::size() const {
    return d_size;
}

#endif	/* QUESTION_H */

